//	Filename:	SegmentsGraph.h
//	Author:		Sandro Spina
//	Date:		27/01/2013
//----------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------
#pragma once

#include <map>
#include <vector>
#include "UniqueId.h"
#include "StructureGraph.h"

namespace Illumina
{
	namespace Core
	{
		struct GraphCut
		{
			//Structure to represent a specific path in the scene graph
			::UniqueID * id;	
			std::map<int, StructureGraph::Node *> * cutNodes;
			std::vector<int> * orderedCutNodes;
			std::map<std::string, int> * DirectionsTravelled;
			int score;
			int transitionCount;
			std::string label;  //Label indicates which object was matched with this cut
			GraphCut(std::string &pLabel);
			void AddNode(StructureGraph::Node * pNode);
			void Clear();
			void ExecuteActions(std::vector<ObjStructureGraph::action> actions, StructureGraph::Node * p_source, StructureGraph::Node * p_sink);
			void GraphCut::ExecuteActionsFromTrace(std::vector<ObjStructureGraph::Node*> pObjTrace, std::vector<int> * pSceneTrace, std::vector<int> * pEdgeIds);
		};

		struct GraphCutSet
		{
			//Structure to group GraphCuts together .. possibly a set of one GraphCut
			std::string shape_name;
			IPrimitive * primitive;
			::UniqueID * id;
			std::vector<GraphCut> * sets;
			int score;
			GraphCutSet();	
		};
	}
}